home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
TPUG Xtras
/
Xtras
/
progdisk.d64
/
hangman.main
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2009-02-07
|
7KB
|
221 lines
10 POKE53280,6:POKE53281,1
15 PRINT"[147]"TAB(15)" [146]"
20 PRINTTAB(15)" [154] HANGMAN [146]"
25 PRINTTAB(15)" [146][158]":PRINT
30 REM***BY WHIZ KIDS***
60 TI$="000000"
70 PRINT"[151]PLEASE TYPE YOUR FIRST NAME":INPUT"AND PRESS RETURN [166][157][157][157]";A0$
80 A=INT(TI/5):FORI=1TOA:X=RND(1):NEXTI
90 N$=LEFT$(A0$,1):POKE53280,6:POKE53281,0
100 PRINT"[147]"TAB(15)" [146]"
104 PRINTTAB(15)" [154] HANGMAN [146]"
106 PRINTTAB(15)" [146][158]":PRINT
110 FORI=1TO10:GETA$:NEXTI
120 PRINT"I THINK OF A WORD AND YOU TRY TO GUESS"
130 PRINT"LETTER BY LETTER WHAT THE WORD IS."
140 PRINT" [162][162][162][162][162][162][162][162][162][162][162][157][157][157][157][157][157][157][157][157][157][157]";
150 PRINT"[161][161][146] [206][206] [194][157][157][157][157][157][157][157][157][157][157][161][161][146] [206][206] [215][157][157][157][157][157][157][157][157][157][157][161][161][146][206][206][157][157][157][157][161][161][146][206]";
160 PRINT"[157][157][157][161][161][146][157][157][161][161][146][157][157][161][161][146][157][157][161][161][146][166][166][166][166][166][163][163][163][163][163][166][166][157][157][157][157][157][157][157][157][157][157][157][157][157][157][166][166][166][166][166][166][166]";
170 PRINT" [166][166][166][166][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][166][166][166][166][166][166][166] [166][166][166][166][166][166]"
180 PRINT"";
190 PRINT"O[157][157][164][194][146][205][157][157][166][163][157][157][157][167][167][157][157][186][186]";
200 M=0:R=0
210 RESTORE:READN:R1=INT(N*RND(1)+1)
220 FOR K=1TOR1:READ A$:NEXTK
230 IF R1<79 AND RND(1)<.3THEN A$=A$+"S"
240 P$=""
250 FOR A=1 TO LEN(A$):P$=P$+"-":NEXTA
260 PRINT"THE WORD IS "P$" "
270 B$="ABCDEFGHIJKLMNOPQRSTUVWXYZ'":U$=""
280 GOTO 340
290 PRINT"THE WORD IS "P$:IF A$=P$ THEN GOSUB1850:GOTO 100
300 R=0:Q=140:GOSUB1940
310 IF TI<140 GOTO 310
320 PRINT" ":PRINT" "
330 PRINT" "
340 PRINT"WHAT IS YOUR GUESS? ";
350 GET G$:PRINT"[157][191][146]";:IFG$=CHR$(13) GOTO 350
360 Q=10:GOSUB1940
370 PRINT"[157][218]";
380 Q=10:GOSUB1940
390 IF G$="" GOTO 350
400 PRINT"[157]"G$:PRINT" "
410 FOR A=1 TO 27
420 IF G$=MID$(B$,A,1) GOTO 450
430 NEXTA
440 PRINT"NOT A VALID":PRINT"CHARACTER!":GOTO 290
450 FOR A=1 TO LEN(U$):IF G$=MID$(U$,A,1) GOTO 470
460 NEXTA:GOTO 500
470 PRINT"YOU HAVE ALREADY"
480 PRINT"USED THAT LETTER!"
490 PRINT"GUESS AGAIN.":GOTO 290
500 U$=U$+G$
510 FOR A=1 TO LEN(A$)
520 IF G$=MID$(A$,A,1) THEN P$=MID$(P$,1,A-1)+G$+MID$(P$,A+1,LEN(P$)):R=1
530 NEXTA
540 IF R=1 GOTO 560
550 PRINT"WRONG":M=M+1:GOSUB580:GOTO 290
560 PRINT"RIGHT"
570 GOTO 290
580 ON M GOTO 590,710,740,780,920,940,1050,1280
590 PRINT"";
600 PRINT"O[157][157][164][194][146][205][157][157][166][163][157][157][157][167][167][157][157][186][186]";
610 Q=50:GOSUB1940
620 PRINT"[157][157][205][145][157][206]";
630 Q=20:GOSUB1940
640 PRINT"[157][157][164][207][157] ";
650 Q=20:GOSUB1940
660 PRINT"[145][145][145][145][145]O[157][157][167][194][146][205][157][157][157][206][166][206][157][157][157][206][167] [157][157][157][157][186] [186][157] ";
670 PRINT"[145][145][145][145][145][157][157]O [157][157][157][192][194][146][205] [157][157][157][157] [166][167] [157][157][157][157][167][167] [157][157][157][186][186] [157][157] ";
680 PRINT"[145][145][145][145][145][157][157]O [157][157][157][198][194][146][205] [157][157][157][157] [166][206] [157][157][157][167] [157][157][186] ";
690 PRINT"[145][145][145][145][145][157][157]O [157][157][157][164][194][146][205] [157][157][157][157] [166][163] [157][157][157][157][167][167] [157][157][157][186][186] [157][157]" ;
700 RETURN
710 PRINT"";
720 PRINT"O[157][157][164][194][146][205][157][157][166][163][157][157][157][167][167][157][157][186][186]";
730 GOTO 620
740 PRINT"";
750 PRINT"O[157][157][164][194][146][205][157][157][166][163][157][157][157][167][167][157][157][186][186]";
760 GOTO 620
770 PRINT"O[157][157][186][194][146][205][157][157][166][163][157][157][157][206] [165][157][157][157][157][186] [205][157][163]";
780 PRINT"";:GOSUB800
790 RETURN
800 PRINT"O[157][157][164][194][146][205][157][157][166][163][157][157][157][167][167][157][157][186][186]";
810 Q=30:GOSUB1940
820 PRINT"[145][157][206][157][205]";
830 Q=15:GOSUB1940
840 PRINT"[145][145][145][145][157][157]O [157][157][157][164][194][146][205] [157][157][157][166][163] [157][157][157][157][206][167] [157][157][157][205][186] [157]";
850 Q=5:GOSUB1940
860 PRINT"[157][157][157][186] ";
870 Q=10:GOSUB1940
880 PRINT"[145][145][145][145][157][157]O [157][157][157][164][194][146][205] [157][157][157][166][163] [157][157][157][157][167][167] [157][157][157][186] [205] [157][157]";
890 Q=5:GOSUB1940
900 PRINT"[145][157][167][160][157][157][186] [157]"
910 RETURN
920 PRINT"";:GOSUB800
930 RETURN
940 PRINT"";
950 PRINT"O [157][157][157][164][194][146][205] [157][157][157][166][163] [157][157][157][157][167][167] [157][157][157][186][186] [157][157]";
960 Q=20:GOSUB1940
970 PRINT"[145][145][145][145][157]O [157][157][157][164][200][146][205] [157][157][157][166][167] [157][157][157][157][167][167] [157][157][157][167][167] [157][157]";
980 Q=15:GOSUB1940
990 PRINT"[145][145][145][145][157]O [157][157][157] [217][146][212] [157][157][157][166][212] [157][157][157][157][167][167] [157][157][157][167][167] [157][157]";
1000 Q=15:GOSUB1940
1010 PRINT"[145][145][145][145][157]O [157][157][157][217]"N$"[146][205][157][157][157][217][166][206] [157][157][157][157][167] [165][157][157][157][186] [204] [157][157]";
1020 Q=20:GOSUB1940
1030 PRINT"[145][145][145][157][157][206][157][205]"
1040 RETURN
1050 PRINT"";
1060 PRINT"O [157][157][157][206]"N$"[146][205][157][157][157][205][166][206] [157][157][157][157][167] [165][157][157][157][186] [204] [157][157]";
1070 GOSUB1440
1080 PRINT"[145][145][157][157][165][167][157]";
1090 GOSUB1440
1100 PRINT"[145][145][157][157][157][163] [163][157][157]";
1110 GOSUB1440
1120 PRINT"[145][145][145][157][157][157][163][163][163][163][157][157][157][157][157] [157][157]";
1130 GOSUB1440
1140 PRINT"[145][145][145][145][157][157][157][205][206][157][157][157][157][157] [157][157]";
1150 GOSUB1440
1160 PRINT"[145][145][145][145][157][157][157] [204][186] [157][157][157][157][157] [157][157]";
1170 GOSUB1440
1180 PRINT"[145][145][145][145][145][157][157][165][167][157][157][157][205][206][157]";
1190 GOSUB1440
1200 PRINT"[145][145][145][145][145][157][157][206][205][157]";
1210 Q=35:GOSUB1940
1220 PRINT"[145][145][145][145][145][157][157][164][129][194][164][157]";
1230 Q=35:GOSUB1940
1240 PRINT"[145][145][145][145][145] [157][186][157]";:A0=(null)^(null):PRINT"[145][145][145][145] [157][208][157]";:A0=(null)^(null)
1250 PRINT"[145][145][145][205][157][206][157]";:A0=(null)^(null):PRINT"[145][145][145][145][145][157][157] [157][204]";:A0=(null)^(null):PRINT"[157] [157][207]";
1260 A0=(null)^(null):PRINT"[157][206][157][205]";
1270 RETURN
1280 GOSUB 1760:GOSUB 1720
1290 PRINT" [157][157][157][157][157][205][205][205]";
1300 Q=5:GOSUB1940
1310 PRINT"[157][157][157][145][145] "
1320 FOR Y=2TO3
1330 FOR B=1TOINT(7*RND(1)+1)
1340 FORR0=YTO4:GOSUB1430:GOSUB1460:NEXTR0
1350 FORR0=4TOYSTEP-1:GOSUB1430:GOSUB1460:NEXTR0:NEXTB:NEXTY
1360 R=(null)^(null)^(null):R0=4:A0=6:L0=4:L1=4:GOSUB1460
1370 Q=500*RND(1):GOSUB1940
1380 A0=6:L0=INT(4*RND(1)+1):L1=INT(4*RND(1)+1):GOSUB1460
1390 L0=4:L1=4:GOSUB1460
1400 Q=15:GOSUB1940:FORI=1TOINT(9*RND(1)):GOSUB1460:NEXTI
1410 Q=300:GOSUB1940
1420 PRINT"[147]":GOTO100
1430 A0=INT(7*RND(1)+1):L0=INT(4*RND(1)+1):L1=INT(4*RND(1)+1):RETURN
1440 Q=5:GOSUB1940
1450 RETURN
1460 ON R0 GOTO 1470,1480,1490,1500
1470 PRINT"";:GOTO 1510
1480 PRINT"";:GOTO 1510
1490 PRINT"";:GOTO 1510
1500 PRINT"";
1510 PRINT" [129] [194] [157][157][157][157][157] Q ";
1520 PRINT"[157][157][157][157][157] "N$"[146] [157][157][157][157][157] [166] [157][157][157][157][157] [157][157][157][157][157] [157][157][157][157][157] ";
1530 ON A0 GOTO 1540,1550,1560,1570,1580,1590,1600
1540 PRINT"[157][157][157][157][157][145][145][145][145][145][205][164][164][206]";:GOTO 1610
1550 PRINT"[157][157][157][157][157][145][145][145][145][206][163][163][163]";:GOTO 1610
1560 PRINT"[157][157][157][157][157][145][145][145][145][206][163][163][145][206]";:GOTO 1610
1570 PRINT"[157][157][157][157][157][145][145][145][145][205][206][205][206]";:GOTO 1610
1580 PRINT"[157][157][157][157][157][145][145][145][167][145][206][205][165]";:GOTO 1610
1590 PRINT"[157][157][157][157][145][145][145][217][145][157][217][212][157][212]";:GOTO 1610
1600 PRINT"[157][157][157][157][145][145][145][205][157][145][206][205][157][206]";:GOTO 1610
1610 ON L0 GOTO 1620,1630,1640,1650
1620 PRINT"[157][157][157][157][157][145][145][145][206][204]";:GOTO 1660
1630 PRINT"[157][157][157][157][157][145][145][145][164][186]";:GOTO 1660
1640 PRINT"[157][157][157][157][157][145][145] [205][164]";:GOTO 1660
1650 PRINT"[157][157][157][157][145][157][145] [165][157][204]";:GOTO 1660
1660 ON L1 GOTO 1670,1680,1690,1700
1670 PRINT"[157][157][157][157][157][145][145][145][186][205]";:GOTO 1710
1680 PRINT"[157][157][157][157][157][145][145][145][204][164]";:GOTO 1710
1690 PRINT"[157][157][157][157][157][145][145][204][206] ";:GOTO 1710
1700 PRINT"[157][157][157][157][145][186][157][145][167] [157]";:GOTO 1710
1710 RETURN
1720 PRINT"SO LONG, "A0$
1730 GOSUB1830
1740 PRINT" "
1750 RETURN
1760 PRINT"SORRY -- THE WORD WAS "A$
1770 GOSUB1830
1780 PRINT"THANKS[157][157][157][157][157]ALOT!"
1790 GOSUB1830
1800 RETURN
1810 GOSUB1830
1820 RETURN
1830 Q=160:GOSUB1940
1840 RETURN
1850 PRINT" CONGRATULATIONS[146]"
1860 PRINT:PRINT" YOU GUESSED IT!":PRINT
1870 PRINT"YOU SAVED YOURSELF":PRINT:FORI1=1TO20
1880 Q=15:GOSUB1940
1890 PRINT"[145]FOR THE TIME BEING"
1900 Q=15:GOSUB1940
1910 PRINT"[145] "
1920 NEXTI1
1930 RETURN
1940 TI$="000000"
1950 IF TI<Q GOTO 1950
1960 RETURN
1970 FORI=1TO148:READA$:PRINT"[147]"A$:Q=0:GOSUB1940:NEXTI
1980 DATA 147
1990 DATA"YANK","JERK","KNOCK","YAWN","WELD","SCOWL","WHIRL","HUSK"
2000 DATA"RASP","SWARM","HARM","TEMPT","ASK","CROWD","THWART","SQUAWK"
2010 DATA"SNOW","END","ARC","ARM","ACT","EXCEPT","EXPEND","EXTRACT"
2020 DATA"JUNK","OBSTRUCT","TWANG","ZEPHYR","NICHE","GHOST","JAB","OHM"
2030 DATA"KIND","COMMODORE","STYLE","SCHISM","SCHEME","CZAR","CRYPT","ZIP"
2040 DATA"SYMPTOM","TWERP","LEAGUE","CRESCENT","WHIZ","SWERVE","GRUB","GROW"
2050 DATA"GNAT","EXEMPT","PSALM","ZEBRA","EXCERPT","INSTINCT","DEPTH","AMP"
2060 DATA"STRENGTH","ANT","NYMPH","SPRINKLING","AWL","ASP","ART","ARK"
2070 DATA"ALP","AXE","URCHIN","AWN","ACE","INKLING","KIDS","KNACK"
2080 DATA"ORCHARD","APE","SCREW","AISLE","YACHT","EMBEZZLE","DUMMY","RHUMBA"
2090 DATA"ASPARAGAS","GNU","WHARF","FOXY","YOGHURT","VOODOO","SOLEMN","DIZZILY"
2100 DATA"GHASTLY","TWILIGHT","STYLUS","SUEDE","ADZ","TYMPANY","TWO","FILCH"
2110 DATA"UGLY","WRY","WAX","SKIING","SCISSORS","TWITCH","VACUUM","PITCH"
2120 DATA"WHY","DRY","STRETCH","TRY","SWIMMING","SWITCH","WATCH","GYPSY"
2130 DATA"GULCH","SKY","DWARF","SIXTH","ELF","FRY","TWELFTH","SPLOTCH"
2140 DATA"PEOPLE","SHREWD","WHO","ARCHAIC","ASH","APT","AND","UNSHRUNK"
2150 DATA"AWE","ALPHA","ESCROW","INFLUX","ISTHMUS","IOTA","JUMPY","KRYPTON"
2160 DATA"OCEANIC","AFT","UNLUCKY","UNSTRUNG","FUZZ","TUX","RYE","AURORA"
2170 DATA"BLITZ","DRUNK","PHYSICS"
2180 PRINT"[147]"